#include "filelistview.h"
#include <QPainter>

FileListView::FileListView(QWidget *parent)
  : QListView(parent)
{

}

void FileListView::paintEvent(QPaintEvent *event)
{
  QListView::paintEvent(event);
  if ((!model()) || this->model()->rowCount() == 0) {
    QPainter painter(this->viewport());
    painter.setFont(QFont("Heiti SC", 15));
    painter.setPen(QPen(Qt::black));
    painter.drawText(rect(), Qt::AlignCenter, tr("没东西呀"));
  }

}
